<template>
  <div class="son">
    <h2 ref="title">我是子组件</h2>
    <SonSonCom />
  </div>
</template>

<script>
import SonSonCom from './SonSonCom.vue'
export default {
  name: 'SonCom',
  components: {
    SonSonCom
  },
  beforeCreate () {
    console.log('子组件-beforeCreate-执行啦!')
  },
  created () {
    console.log('子组件-created-执行啦!')
  },
  beforeMount () {
    console.log('子组件-beforeMount-执行啦!')
  },
  mounted () {
    console.log('子组件-mounted-执行啦!')
  },
  beforeUpdate () {
    console.log('子组件-beforeUpdate-执行啦!')
  },
  updated () {
    console.log('子组件-updated-执行啦!')
  },
  beforeDestroy () {
    console.log('子组件-beforeDestroy-执行啦!')
  },
  destroyed () {
    console.log('子组件-destroyed-执行啦!')
  }
}
</script>

<style>
.son {
  padding: 10px;
  border: 1px solid #000;
  background-color: skyblue;
  width: 300px;
  height: 300px;
}
</style>
